package com.xiaofan.controller;

import com.xiaofan.bean.BaseRespVo;
import com.xiaofan.bean.User;
import com.xiaofan.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 晓帆
 * @version 1.0
 **/
@RestController
@RequestMapping("user")
public class UserController {
    @Autowired
    UserService userService;
    @RequestMapping("select")
    public BaseRespVo select(Integer id,String username){
        System.out.println(username);
        User user = userService.selectUserById(id);
        return BaseRespVo.ok(user);
    }
}
